<#import "../common/adminHeader.ftl" as head>
<#import "../common/footer.ftl" as foot>
<@head.page />
<script type="text/javascript" src="/xheditor/xheditor-zh-cn.min.js"></script>
 <form id="form1" name="form1" method="post" action="/admin/article/postUpdate/${article.id}/">  
	<div style="margin: 10px;">
 		<label title="input title" for="title">
 			Title:
 			<input id="title" name="title" type="text" value="${article.title}" style="width: 290px;" maxlength="128"  >
 		</label>
 		<label title="input alias,used to REST" for="alias" style="padding-left:30px;">
 			Alias:
 			<input id="alias" name="alias" type="text" value="${article.alias}" style="width: 290px;" maxlength="128"  >
 		</label>
 	</div>
 	<div style="margin: 10px; " >
 		<textarea style="width:100%;height:450px;" id="content" name="content" class="xheditor {skin:'o2007silver'}">  
 		 ${article.content}
       	 </textarea> 
 	</div>
 	<div style="margin: 10px; ">
		<div style="margin-bottom: 10px;"> 
			<span style="" id="categoryDiv">
				  <label title="Category" for="category">Category：
					  <select id="category" name="categoryName">
 						<#list categorys as cat>
							<option value="${cat.name}" <#if article.category==cat.name>selected</#if> >${cat.name}</option>
						</#list>
					  </select>
				  </label>
				  <a onclick="EditorManager.addCategory();QZBlog.Util.Statistic.sendPV('addcate_click', 'rizhi.qzone.qq.com');QZONE.event.preventDefault();return false;" class="c_tx" href="javascript:;">添加分类</a>
			  </span>

			  <label title="isComment" for="isComment" style="padding-left:20px;">Comment：
			  <#if article.isComment>
				<input type="radio" name="isComment" value = "true" checked>true
				<input type="radio" name="isComment" value = "false" >false
			  <#else>
				<input type="radio" name="isComment" value = "true" >true
				<input type="radio" name="isComment" value = "false" checked>false
			  </#if>
			  </label>
		</div>
		<div style="margin-bottom: 10px;">
			Tags:
			<span >
				<#list tags as t>
					<label for="${t.name}">
						<input  id="${t.id}" name="tags" type="checkbox"  value="${t.name}"
							<#list article.tags as st> class="tags" <#if st==t.name> checked </#if> style="" </#list>
						>${t.name}
					</label>
				</#list>
			</span>
		</div>
		<div style="margin-bottom: 10px;">
			<label for="submit">
				<input id="submit" type="submit" class="submit" name="submit"  value="Update">
			</label>
		</div>
	</div>
<input id="update" name="update">
 </form>  
<@foot.page />
